package proto

type PusherInfo struct {
	PusherId          string `json:"p_id"`
	PusherVer         int    `json:"p_v"`
	PusherTime        int64  `json:"p_t"`
	PusherRateLimit   int64  `json:"p_r_l"`
	PusherV6Reachable int    `json:"p_v6_r"`
	PusherDuration    int64  `json:"p_d"`
}

type PusherBandwidthInfo struct {
	Bandwidth int64 `json:"b"`
}

type PusherRunTimeInfo struct {
	SrvLastTime int64  `json:"s_l_t"`
	EndTime     int64  `json:"e_t"`
	DebugInfo   string `json:"d_i"`
}

type PusherInfoReq struct {
	PusherInfo
}

type PusherLoginReq struct {
	PusherInfo
	PusherBandwidthInfo
}

type PusherAliveReq struct {
	PusherInfo
	PusherBandwidthInfo
	PusherRunTimeInfo
}

type PusherInfoResp struct {
	Timestamp     int64  `json:"ts"`
	LoginUrl      string `json:"lu"`
	AliveUrl      string `json:"au"`
	SpeedUrl      string `json:"su"`
	SpeedDuration int    `json:"sd"`
	BeRunning     int    `json:"br"`
}

type PusherLoginResp struct {
	Timestamp      int64  `json:"ts"`
	PusherInterval int64  `json:"pi"`
	StatInterval   int64  `json:"si"`
	BlockCount     int64  `json:"bc"`
	UdpRateLimit   int64  `json:"url"`
	RateDelta      int64  `json:"rd"`
	PerUseCount    int    `json:"puc"`
	StatAddr       string `json:"sa"`
}

type PusherAliveResp struct {
	Timestamp int64 `json:"ts"`
}
